<jsp:directive.include file="/jsp/includes/taglibs.jsp" />

<c:if test="${not empty param.login_error}">
	<font color="red"> Your login attempt was not successful, try again.
	<br />
	<br />
	Reason: <c:out value="${session.SPRING_SECURITY_LAST_EXCEPTION.message}" />. </font>
</c:if>

<form name="f" action="<c:url value="/j_spring_security_check"/>" method="post">
	<fieldset>
		<legend>User Login</legend>
		<div class="right">
			<spring:message code="login.register.label" />
			<a href="<c:url value="/account/register" />">
			<spring:message code="login.register.link" /> </a>
			<br/>
			<spring:message code="login.reset.label" />
			<a href="<c:url value="/account/reset" />">
			<spring:message code="login.reset.link" /> </a>

		</div>
		
		<br />
		
		<label for="j_username"><spring:message code="login.email" /></label> 
		<input type="text" id="j_username" name="j_username" value="<c:if test="${not empty param.login_error}"><c:out value="${session.SPRING_SECURITY_LAST_USERNAME}"/></c:if>" />
		
		<br />
		<br />
	
		<label for="j_password"><spring:message code="login.password" /></label>
		<input type="password" id="j_password" name="j_password" />
		
		<br />
		<br />
	
		<label for="spring_security_remember_me"><spring:message code="login.remember" /></label>
		<input type="checkbox" id="spring_security_remember_me" name="_spring_security_remember_me" checked="checked"/>
		
		<br />
		<br />
		
		<input class="submitButton" name="submit" type="submit" value="<spring:message code="login.submit"/>" />
	</fieldset>
</form>
